package ru.amse.ilyin;

import javax.swing.SwingUtilities;

import ru.amse.ilyin.analyzer.Analyzer;
import ru.amse.ilyin.analyzer.impl.AnalyzerImpl;
import ru.amse.ilyin.builder.DiagramBuilder;
import ru.amse.ilyin.builder.impl.DiagramBuilderImpl;
import ru.amse.ilyin.gui.MainWindow;
import ru.amse.ilyin.provider.DiagramProvider;
import ru.amse.ilyin.provider.impl.DiagramProviderImpl;

/**
 * Main class.
 *
 * @author Alexander Ilyin
 */
public class Main {
	/**
	 * Program entry point.
	 * 
	 * @param args arguments of command line
	 */
	public static void main(String[] args) {
		final Analyzer analyzer = new AnalyzerImpl();
		final DiagramBuilder builder = new DiagramBuilderImpl(analyzer);
        final DiagramProvider provider = new DiagramProviderImpl(builder);
        
        SwingUtilities.invokeLater(new Runnable() {
        	public void run() {
        		new MainWindow(provider);
        	}
        });
	}
}
